#ifndef __CW32_HAL_RTC_H_
#define __CW32_HAL_RTC_H_

#include "cw32_hal_def.h"

#include "cw32l01x_rtc.h"

void cw32_hal_rtc_set_alarm(uint32_t alarm_x,RTC_AlarmTypeDef* RTC_AlarmStruct);

#if (RTC_ENABLE == 1)

	#define cw32_hal_rtc_set_time	RTC_SetTime
	#define cw32_hal_rtc_set_date	RTC_SetDate
	//#define cw32_hal_rtc_set_alarm	RTC_SetAlarm

	#define cw32_hal_rtc_get_time	RTC_GetTime
	#define cw32_hal_rtc_get_date	RTC_GetDate
	#define cw32_hal_rtc_get_alarm	RTC_GetAlarm

	#define cw32_hal_rtc_enable			RTC_Cmd
	#define cw32_hal_rtc_alarm_enable 	RTC_AlarmCmd

#else
	#define cw32_hal_rtc_set_time	
	#define cw32_hal_rtc_set_date	

	#define cw32_hal_rtc_get_time	
	#define cw32_hal_rtc_get_date	
	#define cw32_hal_rtc_get_alarm	

	#define cw32_hal_rtc_enable			
	#define cw32_hal_rtc_alarm_enable 	

#endif

#endif



